package com.web.pojo.dto;

import java.io.Serializable;

/**
 * @Author: wws
 * describe:
 */
public class SetSwitchControlStateDTO implements Serializable {

    private Integer id; //设备id
    private byte channel1Manual= (byte) 0xff;// 手动 0：关闭；1：打开；255：无效；
    private byte channel1Remotely= (byte) 0xff;//远程 0：关闭；1：打开；255：无效；
    private byte channel1Timing = (byte) 0xff;//自动 0：关闭；1：打开；255：无效；
    private byte channel2Manual= (byte) 0xff;// 手动 0：关闭；1：打开；255：无效；
    private byte channel2Remotely= (byte) 0xff;//远程 0：关闭；1：打开；255：无效；
    private byte channel2Timing = (byte) 0xff;//自动 0：关闭；1：打开；255：无效；

    public SetSwitchControlStateDTO() {
    }
    public SetSwitchControlStateDTO(Integer id, byte[] deviceResult) {
        this.id = id;
        this.channel1Manual = deviceResult[5];
        this.channel1Remotely = deviceResult[6];
        this.channel1Timing = deviceResult[7];
        this.channel2Manual = deviceResult[8];
        this.channel2Remotely = deviceResult[9];
        this.channel2Timing = deviceResult[10];
    }

    public SetSwitchControlStateDTO(Integer id, byte channel1Manual, byte channel1Remotely, byte channel1Timing, byte channel2Manual, byte channel2Remotely, byte channel2Timing) {
        this.id = id;
        this.channel1Manual = channel1Manual;
        this.channel1Remotely = channel1Remotely;
        this.channel1Timing = channel1Timing;
        this.channel2Manual = channel2Manual;
        this.channel2Remotely = channel2Remotely;
        this.channel2Timing = channel2Timing;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public byte getChannel1Manual() {
        return channel1Manual;
    }

    public void setChannel1Manual(byte channel1Manual) {
        this.channel1Manual = channel1Manual;
    }

    public byte getChannel1Remotely() {
        return channel1Remotely;
    }

    public void setChannel1Remotely(byte channel1Remotely) {
        this.channel1Remotely = channel1Remotely;
    }

    public byte getChannel1Timing() {
        return channel1Timing;
    }

    public void setChannel1Timing(byte channel1Timing) {
        this.channel1Timing = channel1Timing;
    }

    public byte getChannel2Manual() {
        return channel2Manual;
    }

    public void setChannel2Manual(byte channel2Manual) {
        this.channel2Manual = channel2Manual;
    }

    public byte getChannel2Remotely() {
        return channel2Remotely;
    }

    public void setChannel2Remotely(byte channel2Remotely) {
        this.channel2Remotely = channel2Remotely;
    }

    public byte getChannel2Timing() {
        return channel2Timing;
    }

    public void setChannel2Timing(byte channel2Timing) {
        this.channel2Timing = channel2Timing;
    }

    @Override
    public String toString() {
        return "SetSwitchControlStateDTO{" +
                "id=" + id +
                ", channel1Manual=" + channel1Manual +
                ", channel1Remotely=" + channel1Remotely +
                ", channel1Timing=" + channel1Timing +
                ", channel2Manual=" + channel2Manual +
                ", channel2Remotely=" + channel2Remotely +
                ", channel2Timing=" + channel2Timing +
                '}';
    }
}
